1. Field of the Invention
The present invention relates to systems and methods for protecting software from unauthorized use or copying, and in particular to a system and method for protecting software using a hidden application code in a dynamic link library object.
2. Description of the Related Art
Software protection systems are in wide use today. Broadly speaking, these software protection systems can be categorized by how they check whether use of the software is authorized. A first such category includes those software protection systems that use software protection routines that are linked in within the software application itself. A second such category includes software protection routines that are disposed in a loadable library (e.g. a dynamic link library, or DLL) external to the software application. A third such category includes a shell, or wrapper around the software application.
Because linked-in code is more difficult to replace/emulate than a function in an external library, and because shell/wrappers offer the additional protection of (a) encryption of the original code, so most disassemblers will not work, and (b) checksumming the code so attempted code modification can be detected, it is generally best to combine the characteristics of the first and third above categories. However, many software applications and programming languages do not allow linking to externally written and compiled code. Typically, the application can call DLLs through a specific application programming interface (API), but this technique is not entirely secure because such DLLs can be easily disabled (e.g. by replacement with a substitute DLL without the required functionality) by a software hacker. Further, the software applications (or the DLLs) typically do not check to assure that the proper DLL (instead of a hacker-substituted DLL) is loaded. Software hackers can also defeat such software protection systems by altering the application itself, for example, by bypassing application code that performs or initiates the authorization or licensing check.
Some protection DLLs check their own code, but they do not check the calling application. Application vendors also generally do not have the experience or the time to write elaborate code to check their own code or that of the associated DLLs. Since the software application calls the DLL, a hacker could potentially remove all application instructions that call any protection DLLs (checking calls), rendering the software protection system ineffective. What is needed is a system which can help software application vendors protect the software programs with minimal modification to the original (unprotected) code and which cannot be defeated by removing protection DLL calls in the application. The present invention, which places some of the protected applications code into the protected DLL, satisfies this need.